- var includeHomeLink = application.getHocCampaign() || !((me.isStudent() || me.isTeacher()) && !view.course) || view.level.isType('course-ladder', 'ladder');
// No "Done" button for standalone tournament game-dev project levels outside of a campaign
- if (['resource-tycoon'].indexOf(view.level.get('slug')) != -1 || view.inExam)
-   includeHomeLink = false;
if includeHomeLink
  .left-cap
.right-cap
.center-chain
.right-chain
.wood-background

if includeHomeLink
  .levels-link-area
    a.levels-link(href=homeLink || "/", dir="ltr")
      .glyphicon.glyphicon-play
      span(data-i18n=me.isSessionless() ? "nav.courses" : (ladderGame ? "general.ladder" : "nav.map")).home-text

.level-name-area-container
  .level-name-area
    if view.course && !view.inExam
      .level-label= i18n(view.course.attributes, 'name')
    .level-name(title=difficultyTitle || "")
      if view.levelName
        span(dir="auto")= view.levelName
      else
        - var levelNumberLabel = ''
        if view.levelNumber
          - levelNumberLabel = view.levelNumber + '. '
        else if view.level && view.level.get('assessment')
          - levelNumberLabel = $.i18n.t('courses.challenge') + ' '
        span(dir="auto") #{levelNumberLabel}#{worldName.replace('Course: ', '')}
      if levelDifficulty
        sup.level-difficulty= levelDifficulty

.buttons-area

  if !observing
    button.btn.btn-inverse#game-menu-button(data-i18n="[title]play_level.show_menu", title="Show game menu")
      .hamburger
        span.icon-bar
        span.icon-bar
        span.icon-bar
      span.game-menu-text(data-i18n="play_level.game_menu") Game Menu

  if spectateGame
    button.btn.btn-xs.btn-inverse.banner#next-game-button(data-i18n="play_level.next_game") Next game

  if !observing && product != 'codecombat-junior'
    button.btn.btn-xs.btn-primary.banner#level-done-button(data-i18n="play_level.done") Done

  if lastOverallStatus == 'success' && product == 'codecombat-junior'
    button.btn.btn-xs.btn-success.btn-illustrated#level-done-button(title="$t('play_level.next_level')", class="junior")
      img.success-icon(src="/images/level/goal-icons/next-level.png" alt="")
      
  if me.get('anonymous') && !features.noAuth
    button.btn.btn-xs.btn-primary.banner#control-bar-sign-up-button(data-toggle='coco-modal', data-target='core/CreateAccountModal', data-i18n="signup.sign_up")

  if view.level.get('product', true) != 'codecombat-junior' && view.options.hintsState && view.options.hintsState.get('total') > 0
    .btn.btn-small.btn-illustrated.hints-button
      span(data-i18n="play_level.hints")
  if view.showAiBotHelp
    button.btn.btn-small.btn-illustrated.ai-help-button(type="button" data-i18n="[aria-label]play_level.ask_ai")
      span(data-i18n="play_level.ask_ai")
